<?php

namespace app\admin\controller;

use app\BaseController;
use app\model\Presuppose as PresupposeModer;
class Presuppose extends BaseController
{
    public function index()
    {
        return $this->success(PresupposeModer::with('student')->where('status',1)->find());
    }

    public function create()
    {
        PresupposeModer::create(request()->param());
        return $this->success();
    }

    public function update($id)
    {
        PresupposeModer::where('id',$id)->update(request()->param());
        return $this->success();
    }

    public function delete($id)
    {
        PresupposeModer::where('id','in',$id)->delete();
        return $this->success();
    }
}